#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define N 200001

int main(int argc, char *argv[])
{

    char str[N];
    memset(str, 0, N);
    gets(str);

    int len = strlen(str);
    int max = 0, oldi = 0, newi = 0, numlen = 0;
    for (size_t i = 0; i < len; i++)
    {
        if (str[i] == 'U' && str[i + 1] == 'N' && str[i + 2] == 'A' && str[i + 3] == 'L')
        {
            //符合条件L的位置
            newi = i + 3;
            numlen = newi - oldi;
            if(numlen>max){
                max = numlen;
                for (size_t z = oldi; z < newi-3; z++)
                {
                    int num = str[z] - '0';
                    printf("%d", num);
                }
                return;
            }
            oldi = newi;
        }
    }
    printf("-1");

    return 0;
}